﻿#coding=utf-8
from django.conf.urls.defaults import *
from down.models import *
from views import *

#from django.contrib import databrowse
#databrowse.site.register(SomeModel)
#databrowse.site.register(SomeOtherModel)

urlpatterns = patterns('',
   
    #wap站点URL映射
      #(r'^wap/index/$',show_wap_index),
      #(r'^wap/search_soft/$',show_wap_index),
      #(r'^wap/search/$',show_wap_index),
      #(r'^wap/help/bookmark/$',show_wap_bookmark),
      (r'^$',show_wap_index),
      (r'^help/bookmark/$',show_wap_bookmark),
      (r'^search_by_wap/$',search_by_wapid),
      (r'^soft_top50/(?P<page>\d+)/$',soft_top50),
      (r'^game_top50/(?P<page>\d+)/$',game_top50),
      (r'^book_top50/(?P<page>\d+)/$',book_top50),

      #下载down的内容页url
      (r'^soft/detail/(?P<id>\d+)/$',down_detail,{'model':Soft,'template':'wap/soft_detail.wml'}),
      (r'^game/detail/(?P<id>\d+)/$',down_detail,{'model':Game,'template':'wap/game_detail.wml'}),
      (r'^book/detail/(?P<id>\d+)/$',down_detail,{'model':Book,'template':'wap/book_detail.wml'}),
      (r'^book/pic/(?P<id>\d+)/$',show_book_pic),
      (r'^game/pic/(?P<id>\d+)/$',show_game_pic),
      (r'^soft/pic/(?P<id>\d+)/$',show_soft_pic),
      (r'^book/intro/(?P<id>\d+)/$',show_book_info),
      (r'^game/intro/(?P<id>\d+)/$',show_game_info),
      (r'^soft/intro/(?P<id>\d+)/$',show_soft_info),

      #分类页面的url
      (r'^cate/([a-z]{4})/$',show_cate),
      
      
      #频道首页的url
      (r'^soft/$',show_soft_index),
      (r'^game/$',show_game_index),
      (r'^book/$',show_book_index),

      #列表页面的url
      (r'^soft/(?P<id>\d+)/$',down_list,{'model':Soft,'cate':SoftCate,'template':'wap/soft_list.wml'}),
      (r'^game/(?P<id>\d+)/$',down_list,{'model':Game,'cate':GameCate,'template':'wap/game_list.wml'}),
      (r'^book/(?P<id>\d+)/$',down_list,{'model':Book,'cate':BookCate,'template':'wap/book_list.wml'}),
      

      #机型首页的url
      (r'^phone/$',show_phone_index),
      (r'^os/$',show_os_list),
      (r'^oshelp/$',show_os_help),

      #搜索url
      (r'^search_soft/$',search_soft),
      (r'^search_game/$',search_game),
      (r'^search_xiaoshuo/$',search_xiaoshuo),
      (r'^search_soft/page(?P<page>\d+)/$',search_soft),
      (r'^search_game/page(?P<page>\d+)/$',search_game),
      (r'^search_xiaoshuo/page(?P<page>\d+)/$',search_xiaoshuo),

      #游戏机型页中的url
      #(r'^game_new/$',show_game_new),
      (r'^game_top/$',show_game_top),
      (r'^game_top/page(?P<page>\d+)/$',show_game_top),
      (r'^game_recomm/$',show_game_recomm),
      (r'^game_recomm/page(?P<page>\d+)/$',show_game_recomm),
      (r'^game_cate/$',show_game_cate),
      
      (r'^search_phone_game/$',search_phone_game),
      (r'^search_phone_game/page(?P<page>\d+)/$',search_phone_game),

      #社区url
      (r'^forum/$',show_forum_index),

      #友情链接url
      (r'^friendslink/$',show_friendslink_index),
      (r'^coop/$',show_friendslink_submit),
      (r'^do_coop/$',do_friendslink_submit),
)

